import { ConfigType, registerAs } from '@nestjs/config';
import { env, envNumber } from '~/utils/env';
export const appRegToken = 'app';
const globalPrefix = env('GLOBAL_PREFIX', 'api');

export const AppConfig = registerAs(appRegToken, () => ({
  globalPrefix,
  port: envNumber('APP_PORT', 3000)
}));
export type IAppConfig = ConfigType<typeof AppConfig>;
